/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2018-2019.
 * Description: support HITIMERV130 in SD6157
 * Author: qiuguorui <qiuguorui1@huawei.com>
 * Create: 2018-09-26
 */

#ifndef ASM_ARM_HARDWARE_HITIMER_H
#define ASM_ARM_HARDWARE_HITIMER_H

#define REG_HITIMER_RELOAD_L          0x0
#define REG_HITIMER_RELOAD_H          0x4
#define REG_HITIMER_VALUE_L           0x8
#define REG_HITIMER_VALUE_H           0xC
#define REG_HITIMER_CONTROL           0x10
#define REG_HITIMER_INTCLR            0x14
#define REG_HITIMER_INTR_WTH          0x10C
#define REG_HITIMER_LOCK              0x200

#define HITIMER_INT_CLEAR			(0x1<<0)
#define HITIMER_CTRL_ENABLE			(0x1<<0)
#define HITIMER_CTRL_DISABLE		(0x0<<0)
#define HITIMER_CTRL_ONSHOT			(0x0 << 1)
#define HITIMER_CTRL_PERIODIC		(0x1 << 1)
#define HITIMER_ENABLE_IRQ			(0x0 << 3)
#define HITIMER_DISABLE_IRQ			(0x1 << 3)

extern long __init sp804_get_clock_rate(struct clk *clk);

#endif
